const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');

console.log(__dirname);

module.exports = {
  context: path.resolve(__dirname, './app/src'),
  entry: {
    app: './app.js',
  },
  output: {
    path: path.resolve(__dirname, './app/dist'),
    filename: '[name].js'
  },
  plugins: [
    new HtmlWebpackPlugin({
      filename: '../index.html',
      template: '../../template.html',
      inject: false,
      version: new Date().valueOf(),
      minify: {
        removeComments: true,
        collapseWhitespace: false,
        removeAttributeQuotes: false
        // more options:
        // https://github.com/kangax/html-minifier#options-quick-reference
      }
    })
  ]
};

